package city.spring.modules.ext.repository;

import city.spring.modules.ext.entity.MealFoodExt;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 套餐食品关联表数据库映射
 *
 * @author yzh
 */
@Repository
public interface MealFoodExtRepository extends BaseMapper<MealFoodExt> {

    /**
     * 查找周期Id和套餐号对应的关联信息
     *
     * @param mealWeekId 餐次ID
     * @return 关联列表
     */
    List<String> getMealTurnByMealWeekId(@Param("mealWeekId") String mealWeekId);

    List<MealFoodExt> getMealFoodEntity(@Param("mealWeekId") String mealWeekId, @Param("mealTurn") String mealTurn);

    List<Integer> getVotesByMealWeekId(@Param("mealWeekId") String mealWeekId);

}
